import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home.vue';
import index from '../views/index.vue';
import newetextComponent from '../views/list_text.vue'; // 导入第一个夜间路由组件
import myHome from '../views/myHome.vue';
import companyHome from '../views/companyHome.vue';


Vue.use(VueRouter);

const routes = [
  // {
  //   path: '/',
  //   name: 'index',
  //   component: index,
  // },
  {
    path: '/',
    name: 'Home',
    component: Home,
  },
  {
    path: '/new-text',
    name: 'newetext',
    component: newetextComponent,
  },
  {
    path: '/my-home',
    name: 'myHome',
    component: myHome,
  },
  {
    path: '/company-home', 
    name: 'companyHome',
    component: companyHome,
  },

  // 其他路由配置
];

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes,
});

export default router;
